﻿var login = function ($, common) {
    var getToken = function (username, password) {
        var url = common.buildApiUrl('api/AuthorizeApi/Login');
        var data = {
            username: username,
            password: password
        };
        
        common.post(url, data, function (data) {
            window._token = data;
        });
    }

    return {
        getToken: getToken
    }
}($, common);